﻿<UserControl x:Class="Luna.UI.Wpf.NavigationMenu"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"

          xmlns:loki="clr-namespace:Loki.UI.Wpf;assembly=Loki.UI.Wpf"
    xmlns:lc="clr-namespace:Loki.Commands;assembly=Loki.Core"
    xmlns:luna="clr-namespace:Luna.UI;assembly=Luna.Core"
    xmlns:local="clr-namespace:Luna.UI.Wpf"
    xmlns:dxwui="http://schemas.devexpress.com/winfx/2008/xaml/windowsui"
    xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
    xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"

    xmlns:dxwuin="http://schemas.devexpress.com/winfx/2008/xaml/windowsui/navigation"
             mc:Ignorable="d"
             d:DesignHeight="800" d:DesignWidth="1000">
    <UserControl.Resources>
        <Style TargetType="dxlc:Tile" x:Key="TLC_Style">
            <Style.Triggers>
                <DataTrigger Binding="{Binding Command.Tag}" Value="Navigation.Budget.Categories">
                    <Setter Property="Background">
                        <Setter.Value>
                            <LinearGradientBrush EndPoint="0,0" StartPoint="1,1">
                                <GradientStop Color="#FF00AD49" />
                                <GradientStop Color="DarkBlue" Offset="1" />
                            </LinearGradientBrush>
                        </Setter.Value>
                    </Setter>
                </DataTrigger>
                <DataTrigger Binding="{Binding Command.Tag}" Value="Navigation.Budget.List">
                    <Setter Property="Background">
                        <Setter.Value>
                            <LinearGradientBrush EndPoint="0,0" StartPoint="1,1">
                                <GradientStop Color="#FF00AD49" />
                                <GradientStop Color="DarkBlue" Offset="1" />
                            </LinearGradientBrush>
                        </Setter.Value>
                    </Setter>
                </DataTrigger>
            </Style.Triggers>
        </Style>
        <loki:CommandToTileConverter x:Key="mc" />
        <DataTemplate x:Key="itemTemplate">
            <dxlc:Tile  Header="{Binding Header}" Style="{StaticResource TLC_Style}" Command="{Binding Command}"  dxlc:TileLayoutControl.IsFlowBreak="{Binding IsFlowBreak}" dxlc:TileLayoutControl.GroupHeader="{Binding GroupHeader}" />
        </DataTemplate>
    </UserControl.Resources>
    <dxlc:TileLayoutControl ItemsSource="{Binding Navigation.Groups, Converter={StaticResource mc}}" ItemTemplate="{StaticResource itemTemplate}" />
</UserControl>